package com.sdy.resdir.biz.model;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sdy.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sdy.common.utils.DateUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 资源目录-数据源
 * </p>
 *
 * @author cgj
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="RdResourceDirData对象", description="资源目录-数据源")
public class RdResourceDirData extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId
    private Integer id;

    /**
     * 资源名称
     */
    @ApiModelProperty(value = "录入方式:0-文件导入 1-手动导入")
    private Integer addType;

    @ApiModelProperty(value = "资源名称")
    private String resName;

    @ApiModelProperty(value = "编目方式:0-数据源 1-格式化文件")
    private Integer catalogType;

    @ApiModelProperty(value = "交换对接人")
    private String exchangeUserName;

    @ApiModelProperty(value = "联系方式")
    private String phoneNum;

    /**
     * 资源关键字
     */
    @ApiModelProperty(value = "资源关键字")
    private String resKeywords;

    /**
     * 类目名称
     */
    @ApiModelProperty(value = "类目名称")
    private String categoryName;

    /**
     * 资源描述
     */
    @ApiModelProperty(value = "资源描述")
    private String resDesc;

    /**
     * 资源ID
     */
    @ApiModelProperty(value = "所属资源ID")
    private Integer resDirId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = DateUtil.DATETIME_FORMAT)
    private Date createTime;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    private Integer creatUserId;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = DateUtil.DATETIME_FORMAT)
    private Date modifyTime;

    /**
     * 修改人id
     */
    @ApiModelProperty(value = "修改人id")
    private Integer modifyUserId;

    @ApiModelProperty(value = "数据项列表")
    @TableField(exist = false)
    private List<RdResDataItem> dataItems;

    @ApiModelProperty(value = "修改历史")
    @TableField(exist = false)
    private List<RdDirDataUpdateLog> updateLogs;


}
